/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qsdm.es.persistence;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author alberto
 */
@Embeddable
public class HorariocursoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "diaDeLaSemana", nullable = false)
    private int diaDeLaSemana;
    @Basic(optional = false)
    @Column(name = "curso", nullable = false)
    private int curso;

    public HorariocursoPK() {
    }

    public HorariocursoPK(int diaDeLaSemana, int curso) {
        this.diaDeLaSemana = diaDeLaSemana;
        this.curso = curso;
    }

    public int getDiaDeLaSemana() {
        return diaDeLaSemana;
    }

    public void setDiaDeLaSemana(int diaDeLaSemana) {
        this.diaDeLaSemana = diaDeLaSemana;
    }

    public int getCurso() {
        return curso;
    }

    public void setCurso(int curso) {
        this.curso = curso;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) diaDeLaSemana;
        hash += (int) curso;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HorariocursoPK)) {
            return false;
        }
        HorariocursoPK other = (HorariocursoPK) object;
        if (this.diaDeLaSemana != other.diaDeLaSemana) {
            return false;
        }
        if (this.curso != other.curso) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsdm.es.persistence.HorariocursoPK[ diaDeLaSemana=" + diaDeLaSemana + ", curso=" + curso + " ]";
    }
    
}
